<!DOCTYPE html>
  <head>
    <meta charset="utf-8">
    <link href="css/bootstrap.css" rel="stylesheet">
    <style>
      body {
        font: 9px sans-serif;
        color: #121401;
      }
      .axis path,
      .axis line {
        fill: none;
        stroke: #121401;
        stroke-width: 2px;
        shape-rendering: crispEdges;
      }
      .point {
        stroke: grey;
        stroke-width: 3px;
        opacity: 0;
      }
      .point:hover{
        opacity: .5;
      }
      .btn-group {
        padding-left: 60px;
      }
    </style>
  </head>
  <body>
    <div class="col-md-10 col-md-offset-1" id="chart">
      <h4 style="padding-left:60px;">Total Funding Rounds in CrunchBase by Quarter</h4>
      <div class="btn-group" data-toggle="buttons">
        <label class="btn btn-primary active" id="sbar">
          <input type="radio" name="options"> Bar
        </label>
        <label class="btn btn-primary" id="line">
          <input type="radio" name="options"> Line
        </label>
        <label class="btn btn-primary" id="area">
          <input type="radio" name="options"> Area
        </label>
        <label class="btn btn-primary" id="strm">
          <input type="radio" name="options"> Stream
        </label>
      </div>
    </div>
    <script src="lib/d3.js"></script>
    <script src="lib/jquery.js"></script>
    <script src="lib/bootstrap.js"></script>
    <script src="lib/chart.js"></script>
    <script>
      d3.csv("data/crunchbase-quarters.csv", function (error, data) {
        VIZ.stackBarChart($.extend(true, [], data));

        $( ".btn" ).click(function() {
          VIZ.clearAll();
          if (this.id == 'sbar') {
            VIZ.stackBarChart($.extend(true, [], data));
          } else if (this.id == 'line') {
            VIZ.lineChart(data);
          } else if (this.id == 'area') {
            VIZ.stackChart(data, 'zero');
          } else {
            VIZ.stackChart(data, 'wiggle');
          } 
        });
      });

      VIZ.onResize();

      $(window).on("resize", function() {
        VIZ.onResize();
      });
    </script>
  </body>
</html>